<?
require_once(_FRAMEWORK."/core/core_model.php");

class Game {
	const TABLE_PLAYER_LOGIN_INFO = "PlayerLoginInfo";
	const TABLE_USER_PROFILE_INFO = "UserProfileInfo";
	const TABLE_INVENTORY_INFO = "InventoryInfo";
	const TABLE_AVATAR_INFO = "AvatarInfo";
	const TABLE_PLANET_INFO = "PlanetInfo";
	const TABLE_GAME_DATA_INFO = "GameDataInfo";

	const TABLE_HASH_KEY_ELEMENT = "UserId";
}

// Game Model
class game_model_common extends core_model
{
	
	public function main()
	{
		
	}
	
	protected function getRequestData( $keys ) {
		$data = array();
		foreach ( $keys as $i => $key ) {
			if ( $key == "JsonData" ) continue;
			$data[$key] = $this->input->post($key);
		}

		$jsonData = ( ! isset( $keys["JsonData"] ) ) ? array() : object2array( json_decode( urldecode( $this->input->post( "JsonData" ) ) ) );

		return array_merge($data, $jsonData );
	}

	protected function getUserKeyFromSessionId( $session_id ) {
		return "1";
	}
}

?>
